

module.exports = {
    
    state: {
        detail: [{
           id:9,done:false 
        }],
        name:"我是detail"
	},
    getters: {
        anotherGetter2(state) {
            return "anotherGetter-getters"
        }
    },
	mutations: {
		changeSlideState(state,name) {
			// 变更状态
			state.name+="--------detail"
		},
        mutationsFn(state) {
            console.log("detail------mutationsFn",state)
        }
	},
    // 异步更改状态
    actions: {
        actionsIncrement(context, payload) {
            setTimeout(() => {
                context.commit('changeSlideState')
                console.log("context", context, payload);
            },5000)
           
        },
        actionFn(state) {
            console.log("detail------actionFn",state)
        }
    }
}